<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jsp/jstl/core">
	<h:head>
		<title>NAOTEBUK</title>
		<link rel="shortcut icon" href="img/favicon2.ico" />
	</h:head>
	<body>
		<h:outputStylesheet name="css/default.css" />
		<p:layout fullPage="true">
			<p:layoutUnit position="north" size="145" resizable="true" closable="true" collapsible="true" style="padding:3px;background-color:#FFFFFF;">
				<p:panel>
					<p:panelGrid columns="3" style="width:100%;" styleClass="semBorda" columnClasses=",,alignBottom width100p">
						<p:column width="60px">
							<h:graphicImage url="/img/logo_naotebuk.jpg"/>
						</p:column>
						<p:column>
							
						</p:column>  
						<p:column>
							<p:outputLabel value="Bem vindo(a) #{userManagedBean.usuarioLogado.nome}" />
						</p:column>
					</p:panelGrid>
				</p:panel>
		    </p:layoutUnit>
		    <p:layoutUnit position="west" width="220" header="Menu" collapsible="true" resizable="true">
		    	<h:form>
		    		<p:menu style="width: 98%">
			    		<p:submenu label="Cadastros">  
					    	<p:menuitem value="Clientes" outcome="/clientes" icon="ui-icon-person" />
					    	<p:menuitem value="Usuários" outcome="/usuarios" icon="ui-icon-key" rendered="#{usuarioLogado.gerente}"/>
					    </p:submenu>
					    <p:submenu label="Ir para" icon="ui-icon-document">   
						    <p:menuitem value="Consertos" outcome="/consertos" icon="ui-icon ui-icon-wrench"/>
						</p:submenu>
						<p:submenu label="Sistema" >
							<p:menuitem>
								<p:panelGrid styleClass="semBorda" columns="1">
						        	<h:outputText value="Tema:" /> 
							        <p:themeSwitcher value="#{temaManagedBean.tema}" style="width:165px" effect="fade" id="statefulSwitcher">
							            <f:selectItems value="#{temaManagedBean.temas}" />
										 <p:ajax listener="#{temaManagedBean.tema}" /> 						        	
							        </p:themeSwitcher>
						        </p:panelGrid>
					        </p:menuitem>
					        <p:separator />  
						    <p:menuitem value="Sair" action="#{userManagedBean.logout}" ajax="false"/>
					    </p:submenu>
			    	</p:menu>
				</h:form>
		    </p:layoutUnit>
		    <p:layoutUnit position="center" style="border:0px; padding: 0px">
		    	<ui:insert name="corpo">Corpo original do template</ui:insert>
		    </p:layoutUnit>
		    <p:layoutUnit position="south" size="80" resizable="true" closable="true" collapsible="true" >
		    	<p:panelGrid columns="2" style="width:100%" styleClass="semBorda" >
		    		<p:panel styleClass="panelSemBorda" style="margin:0px"  >
						<p:outputLabel value="Alunos: " style="font-size:12px;"/><br />
						<p:outputLabel value="Marciel Ramos" style="font-size:10px;"/><br />
						<p:outputLabel value="Thiago Tanimoto" style="font-size:10px;"/>
					</p:panel>
					<p:ajaxStatus style="width:30px">  
					    <f:facet name="start">  
					        <p:graphicImage value="img/ajax-loader.gif" />  
					    </f:facet>  
					    <f:facet name="complete">  
					        <h:outputText value="" />  
					    </f:facet>  
					</p:ajaxStatus>
				</p:panelGrid>
		    </p:layoutUnit>
		</p:layout>
	</body>
		
</html>